package com.standard.py.springbootwebservicedemo.dao;

import com.standard.py.springbootwebservicedemo.vo.res.RoomMemberResVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * TO DO
 *
 * @author tangjing
 * @date 2021/11/30 10:19
 */
@Mapper
public interface WebserviceMapper {

    /**
     * 查询群组内所有成员
     *
     * @param roomId 群组
     * @return 结果集
     */
    @Select("SELECT b.*,a.type FROM websocket.room_user a LEFT JOIN websocket.user b ON a.user_id = b.user_id WHERE " +
            "a.room_id =#{roomId} ORDER BY a.type ")
    List<RoomMemberResVO> getRoomMemberList(Integer roomId);
}
